<?php
/**
 * Created by PhpStorm
 * author  :gogochen
 * date    :2019/12/9
 * time    :14:40
 */

namespace App\Controller;


use Hyperf\DbConnection\Db;
use Hyperf\HttpServer\Contract\RequestInterface;

class HomeController extends AbstractController
{

    public function index(RequestInterface $request)
    {
        $method = $request->getMethod();
        $id = $request->input('id');
        $name = $request->input('name');
        $token = $this->token;

        return [
            'method' => $method,
            'id' => $id,
            'name' => $name,
            'token' => $token
        ];
    }
}